package com.hutiao.snowhb.actions;

import java.util.Date;
import java.util.Map;

import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.springframework.beans.factory.annotation.Autowired;

import com.opensymphony.xwork2.ActionContext;
import com.opensymphony.xwork2.ActionSupport;

@Namespace("/")
public class IndexAction extends ActionSupport {
	
	private static final long serialVersionUID = 6240278554342019441L;

	@Action(value="index")
	public String index() throws Exception {
		
//		ActionContext ctx = ActionContext.getContext();
//		// 先判断用户是否已经登陆了
//		Map<String, Object> session = ctx.getSession();
//		// 取出名为user的Session属性
//		this.user = (Member)session.get(Constants.SESSION_USER);
//		
//		Date now = new Date();
//		
//		// 获取今日账单
//		this.reportDay = this.reportService.getDayBillByUser(now, this.user.getUid());
//		// 获取本周账单
//		this.reportWeek = this.reportService.getWeekBillByUser(now, this.user.getUid());
//		// 获取本月账单
//		this.reportMonth = this.reportService.getMonthBillByUser(now, this.user.getUid());
		
		return SUCCESS;
	}
}
